<template>
    <div>
        <h1>战狼123</h1>
        <ul>
            <li v-for="movie in moviesList" :key="movie.id" :name="movie.name" :rating="movie.rating"></li>
            <li  v-for="movie in moviesList" :key="movie.id">
                <p>{{ movie.name }}</p>
                <span>{{ movie.rating }}</span>
            </li>
        </ul>
    </div>
</template> 
<script>
    export default {
        name:"hellovue",
        props:["title","name","rate"],
        data:function (){
            return{
                moviesList:[
                    {id:1,name:'haichang',rating:8.1},
                    {id:2,name:'海昌物流',rating:8.1},
                    {id:3,name:'泰坦尼克号',rating:8.1},

                ]
            }
        },
        created:function(){
            console.log('Movies.vue is created');
        },
        methods:{
            fun(){
                alert("收藏成功")
            }
        }
    }
</script>